﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MySql.Data;
using MySql.Data.MySqlClient;

namespace System.Data
{
    /// <summary>
    /// 针对 MySQL 的辅助类
    /// </summary>
    public class MySQLHelper : BaseSQLHelper
    {
        /// <summary>
        /// 默认的 MySQLHelper 辅助类的构造函数
        /// </summary>
        /// <param name="connectCmd"></param>
        /// <param name="autoOpen"></param>
        public MySQLHelper(string connectCmd, bool autoOpen = true) : base(connectCmd, autoOpen)
        {
            _Connection = new MySqlConnection(connectCmd);
            if (autoOpen)
            {
                _Connection.Open();
            }

            _Name = _Connection.Database;
        }
    }
}
